<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>直播测试</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/img/logo.png">
    <script src="assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="assets/css/app.css">
    <script src="assets/js/jquery.min.js"></script>
</head>
<body data-type="widgets">
<script src="assets/js/theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <header>
        <!-- logo -->
        <div class="am-fl tpl-header-logo">
            <a href="javascript:;">
                <img src="assets/img/logo.png" style="width:30px;">
            </a>
        </div>
        <!-- 右侧内容 -->
        <div class="tpl-header-fluid">
            <!-- 侧边切换 -->
            <div class="am-fl tpl-header-switch-button am-icon-list"></div>
            <!-- 其它功能-->
            <div class="am-fr tpl-header-navbar">
                <ul>
                    <!-- 欢迎语 -->
                    <li class="am-text-sm tpl-header-navbar-welcome">
                        <a href="javascript:;">欢迎你，<span>管理员</span> </a>
                    </li>
                    <!-- 新提示 -->
                    <li class="am-dropdown" data-am-dropdown id="orderNewList"></li>
                    <!-- 退出 -->
                    <li class="am-text-sm">
                        <a href="javascript:;">
                            <span class="am-icon-sign-out"></span> 退出
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </header>
    <!-- 头部 -->
    <!-- 风格切换 -->
    <div class="tpl-skiner"></div>
    <!-- 风格切换 -->
    <!-- 侧边导航栏 -->
    <div class="left-sidebar">
        <!-- 用户信息 -->
        <div class="tpl-sidebar-user-panel"></div>
        <!-- 菜单 -->
        <ul class="sidebar-nav"></ul>
    </div>
    <!-- 侧边导航栏 -->

    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
        <div class="row-content am-cf">
            <div class="row">
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">
                                直播测试
                            </div>
                            <!--<div class="widget-function am-fr">-->
                                <!--<a href="javascript:history.go(-1);" class="am-icon-cog"> 返回</a>-->
                            <!--</div>-->
                        </div>
                        <div class="widget-body am-fr" id="liveImg">
                            <img src="assets/img/logo.png">
                            <!--<img src="">-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--自定义弹窗-->
<div id="selfPop"></div>
</body>
</html>


<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script src="assets/js/myself.js"></script>
<script type="text/javascript">
    var domain = getDomain();
    var vid = getUrlParam('vid');
    (function(){
        getLeftMenus();
//        geLive();
    })();
    //获取数据
    setInterval(function(){
//        getLive();
    }, 1000);
    function getLive(){
        var formData = {
            adminAccess:adminAccess,
            uid:1
        };
        $.ajax({
            type: 'post',
            url: domain+'/live/one',
            data: formData,
            success: function(res){
                console.log(res);
                if (res.code!=0) {
                    getSelfPop('没有数据');
                    return
                }
                var data = res.data;
                var imgUrl = data.imgUrl;
                var imgWidth = data.imgWidth;
                var imgHeight = data.imgHeight;
                var img = '<img src="'+imgUrl+'" width="'+imgWidth+'" height="'+imgHeight+'"/>';
                $('#liveImg').html(img);
            },
            error: function(){
                console.log('网络错误');
                getSelfPop('网络错误');
            }
        });
    }
</script>